package Test;

//15题 设计一个接口circleInterface
interface circleInterface{
    double PI=3.14;
    void circleArea();
}
class circleClass implements circleInterface{
    double r;
    double s;
    circleClass(double r){
        this.r=r;
    }
    public void circleArea(){
        s=PI*r*r;
    }
    void show(){
        System.out.println("半径："+r+"的圆面积："+s);
    }
}

public class less03_04 {
    public static void main(String[] args) {
        circleClass c1=new circleClass(3.5);
        c1.circleArea();
        c1.show();

        circleClass c2=new circleClass(5.0);
        c2.circleArea();
        c2.show();
    }
}
